Alibabacloud.com offers a wide variety of articles about how to write xslt for xml, easily find your how to write xslt for xml information here online.
Declare an XML string:
String xml = "....";
Declare the XSLT conversion class:
Extends compiledtransform XSLT = new extends compiledtransform ();
Call the XSLT sheet file:
XSLT. Load ("xsltfile1.
Introduction: Explore the concept of generating PostScript files from an XML document using XSLT as the programming language compiler, especially when creating an XML layer before postscript®. This article describes the style sheet as the concept of implicit language definitions, the basics of PostScript, and the abstraction layers involved when creating
this is not a pig
5) xsl: value-of displays the value of the selected node or attribute.
Select sub-node price
Select weight
6) xsl: attribute: construct the attributes of an xml node.
Used to add attributes to a node, for example:
Output
7) xsl: apply-templates application Template
If the xml file structure is complex, you can define multiple templates and then use
The
series (4)
XML tutorial series (5)
XML classic tutorial
Use System. XML to read and write XML documents
"The XML page cannot be displayed in ASP. net2.0. XML input cannot be
decoration function.
So, now a complete data processing using the Web for higher readability access is:
Xml+xsl+css, these pieces of the separate function, I think I don't need to wordy
so, just as RSS is a special XML, what's special about XSL?
Referring to Microsoft's "XSL Developer's Guide", we can roughly divide the pattern language into three categories:
Select mode:
Test mode:
Match mode:
The appr
The combination of PHP, XML, XSLT, and MySQL. I. php is used in combination with XML, XSLT, and Mysql. I often see some posts about the combination of php, XML, and database, it is also often seen that some beginners use php code in combination with
program and the page that displayed the data.
In order for everyone to understand, I use the simplest way to write a program
program file name: browesdata.php
Page file name: browesdata.html
Program and page file to provide download, this program has been tested under Win2000, MySQL
Code See next page
If you are interested in this technology, let me tell you a little bit more about PHP and XML,
The basic format for parsing using XSLT is this:
Copy Code code as follows:
Xmlns:xsl= "Http://www.w3.org/1999/XSL/Transform" >
This can contain some XHTML tags
XSL refers to the Extended Stylesheet Language (extensible Stylesheet Language), the XSL is an XML stylesheet, and the XSL includes 3 parts: XSLT (a language used to convert
elements. Each XML file must have only one element. Elements can be divided into simple elements and composite elements (with lower-level elements ).(3) attributes can be included in an element (attributes)
4. What is a Cascading Style Sheet?The description structure of the common flag language, rather than the format. The style sheet adds the display format without damaging the document structure.
5. What is XSL? What is the relationship with CS
, The following is a simple process of extracting data from the database, generating XML documents, and converting to HTML using XSLT, This process only describes the process of using this technology and does not involve paging and other technologies in this example, I use the following database tables and data Table Name: enterprise user information table, English name: yhxx table structure: # struct
("guestbook. XSL "));
String xmlquery = "// Guestbook ";Xmlnodelist nodelist = xdoc. documentelement. selectnodes (xmlquery );
Memorystream MS = new memorystream ();XSLT. Transform (xdoc, null, MS );Ms. Seek (0, seekorigin. Begin );
Streamreader sr = new streamreader (MS );
// Display the output resultResponse. Write (Sr. readtoend ());}
This method first creates an xmldocument object to load the
ICONV
Two PHP with XML, XSLT, MySQL, the combination of application, the first chapter
What I'm going to talk about here is a simple process of extracting data from a database, generating an XML document, and translating it into HTML using XSLT,
This process only speaks of the process of using this technology and does
iconvThe combination of php, XML, XSLT, and MysqlNext I will talk about a simple process of extracting data from the database, generating XML documents, and converting to HTML using XSLT,This process only describes the process of using this technology, and does not involve paging and other technologies.In this example
In. net, using javascompliedtransform allows you to easily format XML documents using XSLT,
// Load XML document Xpathdocument xmlxpathdoc = New Xpathdocument (httpcontext. Current. server. mappath ( " Sample. xml " ); // Load XSLT document Extends compiledtransform
involve paging and other technologies
This example I use the following database tables and data
Table Name: Enterprise User Information table, English name: yhxx
Table structure:
#
# The structure of the datasheet ' yhxx '
#
CREATE TABLE Yhxx (
NSRNM varchar not NULL default ',
QYMC varchar not NULL default ',
QYDH varchar not NULL default ',
PRIMARY KEY (NSRNM)
) Type=myisam comment= ' User Information table ';
#
# datasheet content ' Yhxx '
#
INSERT into Yhxx VALUES (' 310109040111985 ',
XSLT is a language used to convert XML document structures. it is short for EXtensibleStyleLanguageExtensionsTransformations. 1. Introduction
XSLT is a Language used to convert XML document structures. it is short for EXtensible Style Language Extensions Transformations.
XSLT
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.